package framework.manage;

import java.util.ArrayList;

import android.app.Activity;

public class ManageAct {
	private ArrayList<Activity> allAct;
	private ArrayList<Activity> actMainPages;

	private static ManageAct instance = new ManageAct();

	private ManageAct() {
		allAct = new ArrayList<Activity>();
		actMainPages = new ArrayList<Activity>();
	}

	public static ManageAct getInstance() {
		return instance;
	}

	public void addAct(Activity act) {
		allAct.add(act);
	}

	public void addActMainPage(Activity act) {
		actMainPages.add(act);
	}

	public void deleteAct(Activity act) {
		allAct.remove(act);
	}

	public ArrayList<Activity> getAllAct() {
		return allAct;
	}

	public ArrayList<Activity> getAllActCopy() {
		ArrayList<Activity> acts = new ArrayList<Activity>();
		for (int i = 0; i < allAct.size(); i++) {
			acts.add(allAct.get(i));
		}
		return acts;
	}

	public ArrayList<Activity> getActMainPage() {
		return actMainPages;
	}

	public void clear() {
		allAct.clear();
		clearActMainPage();
	}

	public void clearActMainPage() {
		actMainPages.clear();
	}

	public void deleteActMainPage(Activity act) {
		actMainPages.remove(act);
	}

}
